<%-- 
    Document   : menuarbol
    Created on : 23-mar-2010, 12:25:47
    Author     : kerito
--%>


<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<f:view>



    <h:form>


        <%--    <rich:tree style="width:300px" nodeSelectListener="#{tree.processSelection}"
                   reRender="selectedNode" ajaxSubmitSelection="true"  switchType="Ajax"
                   value="#{tree.treeNode}" var="item" ajaxKeys="#{null}">
            <rich:treeNode>

                    <h:outputText value="#{item}" />

                </rich:treeNode>
            </rich:tree>

            <h:outputText escape="false" value="Selected Node: #{tree.nodeTitle}" id="selectedNode" />

        --%>
        <a4j:outputPanel ajaxRendered="true">

            <h:panelGrid columns="2" width="100%" columnClasses="col1,col2">
                <rich:tree value="#{SimpleTreeBean.stationNodes}" var="station"  switchType="client"
                           nodeSelectListener="#{SimpleTreeBean.processSelection}"
                           reRender="selectedNode" ajaxSubmitSelection="true">

                    <rich:treeNode>

                        <h:outputText value="#{station}" />

                    </rich:treeNode>

                </rich:tree>

                <h:outputText escape="false" value="Selected Node: #{SimpleTreeBean.nodeTitle}" id="selectedNode" />

            </h:panelGrid>

        </a4j:outputPanel>

    </h:form>


</f:view>